<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<!DOCTYPE html>
<html lang="en">
<head>
<%
	String bathPath = request.getContextPath();
	pageContext.setAttribute("bathPath", bathPath);
%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>增加权限组</title>
<link rel="stylesheet" href="${bathPath}/frame/layui/css/layui.css">
<link rel="stylesheet" href="${bathPath}/frame/static/css/style.css">
<link rel="icon" href="${bathPath}/frame/static/image/code.png">
<link type="text/css" rel="stylesheet" href="${bathPath}/css/page.css"/>
<script type="text/javascript" src="${bathPath}/js/jquery-1.9.1.min.js" ></script>
<script type="text/javascript" src="${bathPath}/js/ajaxSessionOut.js" ></script>
<!-- 1    css资源 -->
<link rel="stylesheet" type="text/css" href="${bathPath}/js/jquery-easyui-1.4.2/themes/default/easyui.css">
<!-- 2    图标资源 -->
<link rel="stylesheet" type="text/css" href="${bathPath}/js/jquery-easyui-1.4.2/themes/icon.css"> 
<!-- 3    EasyUI的js包 -->
<script type="text/javascript" src="${bathPath}/js/jquery-easyui-1.4.2/jquery.easyui.min.js"></script>
<!-- 4    本地语言 -->
<script type="text/javascript" src="${bathPath}/js/jquery-easyui-1.4.2/locale/easyui-lang-zh_CN.js"></script>
<!-- layer -->
<link type="text/css" rel="stylesheet" href="${bathPath}/js/layer/skin/layer.css"/>
<script type="text/javascript" src="${bathPath}/js/layer/layer.js" ></script>
<!-- validation -->
<script type="text/javascript" src="${bathPath }/js/jquery-validation/jquery.validate.js"></script>

<script src="${bathPath }/js/quickui/libs/js/form/validationRule.js" type="text/javascript"></script>
<script src="${bathPath }/js/quickui/libs/js/form/validation.js" type="text/javascript"></script>
<script src="${bathPath}/frame/layui/layui.js" charset="utf-8"></script>
<style type="text/css">
.my-skin .layui-layer-btn a {
	background-color:#009688;
</style>
<script type="text/javascript">
function search(){
	var param=$("form").serialize();
	$.ajax({
		type:"POST",
		async:false,
		dataType:"text",
		data:param,
		url:"${bathPath}/aDKPowerGroup/updatePGroup.action",
		success:function(data){
			layer.confirm("保存成功！", {btn: ['确定'], title: "提示",skin:"my-skin"}, function(){
				parent.layer.close(parent.layer.index);
				parent.location.reload();
				});
			}
		});
	}


layui.use('form', function(){
	  var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功

	  //……
	  
	  //但是，如果你的HTML是动态生成的，自动渲染就会失效
	  //因此你需要在相应的地方，执行下述方法来手动渲染，跟这类似的还有 element.init();
	  form.render();
});
</script>
</head>
<body class="body">
<form class="layui-form layui-form-pane" id="myform" method="post" action="" showOnMouseOver="false">
	<input type="hidden" name="groupID" value="${powerbean.groupID}" >
	<table class="param_table">
		<tr>
			<td style="width:250px; padding:3px;">
				<div class="layui-form-item">
       				<label class="layui-form-label" style="width:120px;">权限组名称：</label>
       			<div class="layui-input-inline">
            			<input type="text" id="groupName" name="groupName" placeholder="请输入" value="${powerbean.groupName}" vlay-verify="required" autocomplete="off" class="layui-input">
            		</div>
            	</div>
            </td>
		</tr>
		</tr>
			<td style="border:0;">
				<input class="layui-btn site-demo-active layui-btn-sm" style="margin-left:305px;" type="button" onclick="search()" value="保 存"  class="primary"/>
            </td>
		</tr>
   </table>
</form>
</body>
</html>